"""
阶乘
用循环求对应的阶乘
"""

n = int(input("请输入一个整数"))

fac = 1
for i in range(1, n+1):
    print("fac*i", fac, i)
    fac = fac * i
print(fac)

# def test(fac):
#     x = 1
#     for i in range(1, fac + 1):
#         x = x * i
#     return x
#
#
# n = int(input("请输入一个整数"))
# res = test(n)
# print(f"阶乘结果为:{res}")
